package ooday02;

/** 学生类 */
public class Student extends Person {
    //有几个属性传几个参
    String className;
    String stuid;






    Student(){
    }
    Student(String name ,int age , String address , String className ,String stuid){
        super(name,age,address);  //super调用父类中
        /*this.name = name;
        this.age = age;
        this.address = address;*/
        this.className = className;
        this.stuid = stuid;
    }

    void study(){
        System.out.println(name+"正在学习....");
    }

    void sayHi(){
        System.out.println("大家好，我叫"+name+",今年"+age+"岁了，家住"+address+",所在班级为："+className+",学号为："+stuid);
    }
}
